function [azimuth_rate] = calc_positioner_rates(azimuth_intercepts, max_rate)
  [num_radars, num_targets] = size(azimuth_intercepts);
  
  delta = zeros(num_radars, num_targets-1);
  azimuth_rate = zeros(num_radars, num_targets-1);
  
  % RF: (2014-01-15) disabled max limits below and set to max.
  %lim_rate = max_rate;
  
  for t = 2:num_targets
    delta(:,t) = azimuth_intercepts(:,t) - azimuth_intercepts(:,t-1);
    
    if t > 2
      % This check ensures that if the positioner is meant to reverse direction 
      % due to the azimuth intercepts,it instead just remains stationary.
      
      for r = 1:num_radars
        % find first sign
        for t2 = 1:num_targets
          first_sign = sign(delta(r,t2));
          if (first_sign ~= 0)
            break;
          end
        end
        
        if (first_sign ~= 0)&& (sign(delta(r,t)) ~= first_sign)
          delta(r,t) = 0;
        end
      end
    end
    
    if (abs(delta(1,t)) > 0) && (abs(delta(2,t)) > 0)
      % Both positioners are moving
      
      if (abs(delta(1,t)) < abs(delta(2,t)))
        lim_rate = abs(delta(2,t)) / ceil(abs(delta(2,t)) / max_rate);
        
        azimuth_rate(1,t) = lim_rate * abs(delta(1,t) / delta(2,t));
        azimuth_rate(2,t) = lim_rate;
      elseif (abs(delta(1,t)) == abs(delta(2,t)))
        lim_rate = abs(delta(1,t)) / ceil(abs(delta(1,t)) / max_rate);
        
        azimuth_rate(1,t) = lim_rate;
        azimuth_rate(2,t) = lim_rate;
      else
        lim_rate = abs(delta(1,t)) / ceil(abs(delta(1,t)) / max_rate);
        
        azimuth_rate(1,t) = lim_rate;
        azimuth_rate(2,t) = lim_rate * abs(delta(2,t) / delta(1,t));
      end
    else
      % One positioner is meant to be stationary
      
      if abs(delta(1,t)) == 0
        azimuth_rate(1,t) = 0;
      else
        lim_rate = abs(delta(1,t)) / ceil(abs(delta(1,t)) / max_rate);
        azimuth_rate(1,t) = lim_rate;
      end
      
      if abs(delta(2,t)) == 0
        azimuth_rate(2,t) = 0;
      else
        lim_rate = abs(delta(2,t)) / ceil(abs(delta(2,t)) / max_rate);
        azimuth_rate(2,t) = lim_rate;
      end
      
      %if (azimuth_rate(1,t) == 0) && (azimuth_rate(2,t) == 0)
      %  azimuth_rate(:,t) = max_rate;
      %end
    end
  end
  
end